<template>
	<view>
		
		<view class="v2">
			<br>
			<u-button @click="dialogToggle('success')" class="button1" type="success" shape="circle">
				保存
			</u-button>
		</view>
		
		
		
		
		<view>
			<!-- 确认修改、取消修改 -->
			<uni-popup ref="alertDialog" type="dialog">
				<uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" title="通知" content="是否确认修改本次会议？"
					@confirm="dialogConfirm" @close="dialogClose">
					<!-- -->
				</uni-popup-dialog>
			</uni-popup>
		
		
			<!-- 修改成功后的提示 -->
			<uni-popup ref="message" type="message">
				<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
			</uni-popup>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 'center',
				msgType: 'success',
				messageText: '这是一条成功提示',
			}
		},
		methods: {
			dialogToggle(type) {
				this.msgType = type
				this.$refs.alertDialog.open()
			},
			
			
			dialogConfirm() {
				//调用修改请求
				// this.compile()
				console.log('点击确认')
				this.messageText = `您已成功修改！`
				this.msgType = 'success'
				this.$refs.message.open()
			
			},
			
			dialogClose() {
				console.log('点击取消')
				this.messageText = `您已取消修改！`
				this.msgType = 'info'
				this.$refs.message.open()
			},
		}
	}
</script>

<style>

</style>
